package cn.stylefeng.guns.sys.modular.system.mapper;

import cn.stylefeng.guns.sys.modular.system.entity.Project;
import cn.stylefeng.guns.sys.modular.system.entity.TaskStatus;
import cn.stylefeng.guns.sys.modular.system.model.params.TaskStatusParam;
import cn.stylefeng.guns.sys.modular.system.model.result.TaskStatusResult;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 任务状态确认表 Mapper 接口
 * </p>
 *
 * @author jiangge
 * @since 2020-09-10
 */
public interface TaskStatusMapper extends BaseMapper<TaskStatus> {

    /**
     * 获取列表
     *
     * @author jiangge
     * @Date 2020-09-10
     */
    List<TaskStatusResult> customList(@Param("paramCondition") TaskStatusParam paramCondition);

    /**
     * 获取map列表
     *
     * @author jiangge
     * @Date 2020-09-10
     */
    List<Map<String, Object>> customMapList(@Param("paramCondition") TaskStatusParam paramCondition);

    /**
     * 获取分页实体列表
     *
     * @author jiangge
     * @Date 2020-09-10
     */
    Page<TaskStatusResult> customPageList(@Param("page") Page page, @Param("paramCondition") TaskStatusParam paramCondition);

    /**
     * 获取分页map列表
     *
     * @author jiangge
     * @Date 2020-09-10
     */
    Page<Map<String, Object>> customPageMapList(@Param("page") Page page, @Param("paramCondition") TaskStatusParam paramCondition);

    List<TaskStatus> listBytaskids(@Param("proId") Integer proId, @Param("taskIds") String taskIds);

    List<TaskStatus> listTaskStatus();

    List<TaskStatus> listProjectFinish(@Param("proId") Integer proId);

    int deleteSt(TaskStatusParam param);

    /**
     * 查询状态表数据
     * @param taskId
     * @return
     */
    List<TaskStatus> select(Integer taskId);

    TaskStatusResult findOneByParam(@Param("param") TaskStatusParam statusParam);

    List<TaskStatus> selectYy(Integer taskId);

    /**
     * 流程进度
     * @param
     * @return
     */
    List<TaskStatusResult> productList();

    int updateStatus(TaskStatus status);

    int updateAuditSt(TaskStatus status);

    int selectSta(TaskStatus entity);

    int selectStau(TaskStatus entity);

    int isExist(TaskStatus entity);

    int insertSta(TaskStatus entity);

    List<Integer> listAuditFinish(@Param("taskIds") String taskIds, @Param("nums") Integer nums);

    List<TaskStatus> selectAu(@Param("taskId") Integer taskId);

    List<Integer> getTaskByRole(@Param("list") List<Long> list);

    int updateStatus2(@Param("param")TaskStatusParam param);

    int deletes(@Param("param")TaskStatusParam param);

    List<TaskStatus> listReject();

    /**
     * 查询已经填写到货时间数据
     * @param
     * @return
     */
    List<Map> selectDh(@Param("taskId") Integer taskId);

   int  updateByProId(@Param("param")TaskStatusParam param);

    Date getWsjd(@Param("proId") Integer proId);

    int editBatch(@Param("proId") String proId, @Param("status") Integer status,@Param("taskId") Integer taskId);

    void deleteWsjd(@Param("param") TaskStatusParam param);
}
